package com.cn.springcloudwechat.mapper.mapper.order;

import com.cn.springcloudwechat.common.mybatis.Page;
import com.cn.springcloudwechat.model.order.YmOrder;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 订单
 *
 * @program: YmOrderMapper
 * @author: Administrator
 * @create: 2018-07-31 18:29
 */
@Repository
public interface YmOrderMapper {
    /**
     * 添加订单数据
     *
     * @param record
     * @return
     */
    long insertSelective(YmOrder record);

    /**
     * 根据订单详情查询订单详情
     *
     * @param orderId
     * @return
     */
    YmOrder selectByPrimaryKey(Long orderId);

    /**
     * 更新订单
     *
     * @param record
     * @return
     */
    Integer updateByPrimaryKeySelective(YmOrder record);

    /**
     *  批量获取订单数据
     * @param record
     * @return
     */
    List<Object> getAllYmOrder(@Param("record") YmOrder record, Page<Object> page);

    /**
     * 根据商户订单号获取订单数据
     * @param outTradeNo
     * @return
     */
    YmOrder getOrderPayStateByOutTradeNo(@Param("outTradeNo")String outTradeNo);


}